public class Context{
    private State _state;
    //  条件变量，用于判断是否需要切换状态  
    private int condition;

    public void ChangeState(State state){
        _state = state;
    }
    public void Handle(){
        _state.Handle(this);
    }
}